package com.atguigui.leetcode1;

/**
 * Project: leetcode
 * Package: com.atguigui.leetcode1
 * Version: 1.0
 * <p>
 * Created by WJX on 2023/6/13 17:03
 */
public class P2475NumberOfUnequalTripletsInArray {
    public static void main(String[] args) {
        P2475NumberOfUnequalTripletsInArray.Solution solution = new P2475NumberOfUnequalTripletsInArray().new Solution();
        // TO TEST
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public int unequalTriplets(int[] nums) {
            int n = nums.length, res = 0;
            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j < n; j++) {
                    for (int k = j + 1; k < n; k++) {
                        if (nums[i] != nums[j] && nums[i] != nums[k] && nums[j] != nums[k]) {
                            res++;
                        }
                    }
                }
            }
            return res;
        }
    }
}
